<?php
	session_start();
	if(isset($_REQUEST['mask'])&& isset($_REQUEST['nd']))
	{
		$mask=$_REQUEST['mask'];
		$nd=$_REQUEST['nd'];
		require("../DAO/DataHelper.php");
		require("../DAO/BinhLuanSuKienDTO.php");
		require("../DAO/BinhLuanSuKienDAO.php");
		if(isset($_SESSION['IsLogin'])&& isset($_SESSION['UserName']))
		{
			$username=$_SESSION['UserName'];
			$sk=new BinhLuanSuKienDTO();
			$sk->blsk_ma_su_kien=$mask;
			$sk->blsk_username=$username;
			$sk->blsk_noi_dung=$nd;
			$sk->blsk_ngay_tao=date("Y/m/d");
			$sk->blsk_tong_so_sao=0;
			
			if(BinhLuanSuKienDAO::ThemBinhLuanSuKien($sk))
			{
				echo($mask);
			}
			else
			{
				echo("false");
			}
		}
		else
		{
			echo("false");
		}
		
	}
?>